import FairyEditor = CS.FairyEditor;

export function generatePackageResBundleName(name: string): string {
    return `fgui-${name.toLowerCase().replaceAll('_', '-')}`;
}

export function generatePackageScriptBundleName(name: string, sameWithRes: boolean): string {
    if (sameWithRes) return generatePackageResBundleName(name);
    return `fgui-script-${name.toLowerCase().replaceAll('_', '-')}`;
}

export function generateBindAllFunctionName(handler: FairyEditor.PublishHandler): string {
    const name = handler.ToFilename(handler.pkg.name);
    return `bindAll${name[0].toUpperCase() + name.slice(1)}`;
}